<div id="content" ng-controller="AddActionCtrl">
    <div smart-include="sensor/views/sub-header.tpl.html"></div>
    <div class="clearfix margin-bottom-10">
        <!-- <div class="pull-left margin-right-20">
            <a class="btn btn-labeled btn-primary" data-toggle="modal" data-target="#addAlert"> <span class="btn-label"><i class="glyphicon glyphicon-plus"></i></span>添加动作</a>
        </div> -->
    </div>
    <div class="table-responsive">
        <table class="table table-bordered table-hover no-margin font-sml table-striped sensor_table">
            <thead>
                <tr>
                    <th class="text-align-center">状态码</th>
                    <!-- <th class="text-align-center">action_id</th> -->
                    <th class="text-align-center">动作</th>
                    <th class="text-align-center">描述</th>
                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="data in datas">
                    <!-- <td>
                        <button class='btn btn-xs btn-default' uib-tooltip='编辑' tooltip-append-to-body='true' data-toggle="modal" data-target="#editAlert" ng-click="showEditAlert(data)"><i class='fa fa-pencil'></i></button>
                        <button class='btn btn-xs btn-default' uib-tooltip='删除' tooltip-append-to-body='true'data-toggle="modal" data-target="#delAlert" ng-click="showDelDialog(data.id)"><i class='fa fa-times'></i></button>
                    </td> -->
                    <td class="text-align-center">{{data.action_id}}</td>
                    <td class="text-align-center">{{data.action}}</td>
                    <td class="text-align-center">{{data.name}}</td>
                </tr>
            </tbody>
        </table>
    </div>
    <!-- end widget content -->
    <div class="dt-toolbar-footer">
        <tm-pagination conf="paginationConf"></tm-pagination>
    </div>

    <div class="modal fade" id="addAlert" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                        &times;
                    </button>
                    <h4 class="modal-title" id="myModalLabel">添加动作设置</h4>
                </div>
                <div class="modal-body">
                    <form  class="form-horizontal">
                       <div class="form-group">
						    <label for="firstname" class="col-sm-1 control-label label_name">动作</label>
						    <div class="col-sm-5">
						      <input type="text" ng-model="addobj.action" class="form-control"placeholder="动作">
						    </div>
						    <label for="firstname" class="col-sm-1 control-label label_name">描述</label>
						    <div class="col-sm-5">
						      <input type="text" ng-model="addobj.name" class="form-control" placeholder="描述">
						    </div>
						</div>
                    </form>
                </div>
                <div class="modal-footer">
                	<button class="btn btn-default"data-dismiss="modal">关闭</button>
                	<button class="btn btn-primary">提交</button>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->
    <div class="modal fade in" id="editAlert" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                        &times;
                    </button>
                    <h4 class="modal-title" id="myModalLabel">编辑动作设置</h4>
                </div>
                <div class="modal-body">
                    <form  class="form-horizontal">
                       <div class="form-group">
						    <label for="firstname" class="col-sm-1 control-label label_name">动作</label>
						    <div class="col-sm-5">
						      <input type="text" ng-model="editobj.action" class="form-control"placeholder="动作">
						    </div>
						    <label for="firstname" class="col-sm-1 control-label label_name">描述</label>
						    <div class="col-sm-5">
						      <input type="text" ng-model="editobj.name" class="form-control" placeholder="描述">
						    </div>
						</div>
                    </form>
                </div>
                <div class="modal-footer">
                	<button class="btn btn-default"data-dismiss="modal">关闭</button>
                	<button class="btn btn-primary">提交</button>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->
    <div class="modal fade in" id="delAlert" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                        ×
                    </button>
                    <h4 class="modal-title">信息</h4>
                </div>
                <div class="modal-body">
                    <p>
                        您确实要删除这个动作吗？
                    </p>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">
                        关闭
                    </button>
                    <button type="button" class="btn btn-primary" ng-click="deldevice()">
                        确认
                    </button>
                </div>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
    <!-- /.modal-dialog -->
</div>
<!-- END MAIN CONTENT